$(function() {
					$("#form-resetPassword").Validform({
						tiptype : 2,
						showAllError : true,
						btnSubmit: "bnt_submit",
						datatype : {
							"empty" : /^\s*$/,
							"money" : /^[1-9]\d{0,5}$/
						},
						callback : function(form) {
							bnt_submit();
							return false;
						}
					});
					var userId =$("#userId").text();
					$('#userId').val(userId);
		}); 
	 	
	 	bnt_submit = function(){
			   var data = {};
			   var userId =	$("#userId").val();
			console.log("userId= "+userId);
			   data.userId = userId;
			   data.userpassword = $.trim($("#userpassword").val());
			   if(data.userpassword==''){
				  layer.msg("密码不能为空！");
				   return;
			   }
		 	   layer.confirm('您确定要提交修改吗？',function(){
				   $.ajax({
						type : "post",
						url : $("#baseUrl").text()+'/api/employee/resetPassword',
						dataType : "json",
						contentType : "application/json",
						data : JSON.stringify(data),
						success : function(result) {
							if (!result.flag) {
								layer.msg("提交失败！原因：" + result.message);
								return;
							}
							parent.location.reload();
							window.close();
						}
					});
		 	  });
			}